/* 
 * File:   Node.h
 * Author: hyjkim
 *
 * Created on April 5, 2012, 12:45 PM
 */

#include <map>
#include <string>


class Node {
    Node *_parent;
    std::map<std::string,Node*> _children;
    std::string _name;
    std::map<std::string, std::string>  _seq;
    
public:
    Node() {
    _name = "";
    }
    Node(std::string name) {
    _name = name;
    }
    /*
    Node(Node* parent, Node* children) {
    *_parent = &parent;
    *_children = &children;
    }
*/

    void respond();
    void setName(std::string name);
    bool hasName();
    std::string getName();
    void printName();

    Node *getParent();
    void setParent(Node *parent);

    void addChild(Node* child);
    Node *getChild(std::string childName);
    int childExists(std::string childName);
    std::map<std::string,Node*> getChildren();


    void addSeq(std::string seqName, std::string seq);
    std::string getSeq(std::string seqName);
    std::map<std::string, std::string> getSequences();
};


